package com.qfedu.lc.api.controller;

import com.qfedu.lc.api.feign.UserService;
import com.qfedu.lc.common.param.UserAdd;
import com.qfedu.lc.common.vo.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * 1.用户表(User)表控制层
 *
 * @author makejava
 * @since 2023-10-19 14:19:50
 */
@RestController
@RequestMapping("api/user/")
@Api(tags = "用户操作")
public class UserController {
    /**
     * 服务对象
     */
    @Resource
    private UserService service;

    @PostMapping("register")
    public R register(@RequestBody UserAdd add, HttpServletRequest request){
        return service.register(add);
    }
    @GetMapping("all")
    public R all(){
        return service.all();
    }
    @GetMapping("alllogs")
    public R allLogs(){
        return service.allLogs();
    }
}

